package com.stbu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class MyController {

    @GetMapping("/toWelcome")
    public String toWelcome() {
        return "welcome.jsp";
    }

    @RequestMapping("/toParam")
    public String getParam(@RequestParam("u1") String u ) {
        System.out.println("获取的参数为：" + u);
        return "first.jsp";
    }
}
